package com.pipi.biyesheji.service.impl;

import com.pipi.biyesheji.pojo.User;
import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Service;

/**
 * All rights Reserved, Designed By www.maihaoche.com
 *
 * @Package com.pipi.biyesheji.realm
 * @author: 皮皮（pipi@maihaoche.com）
 * @date: 2019/4/19 11:12 PM
 * @Copyright: 2017-2020 www.maihaoche.com Inc. All rights reserved.
 * 注意：本内容仅限于卖好车内部传阅，禁止外泄以及用于其他的商业目
 */
@Service
public class UserInfo {

    public User getCurrentUser() {
        return (User) SecurityUtils.getSubject().getSession().getAttribute("user");
    }
}
